package cn.kami.dao.proxy;

import java.util.List;

import cn.kami.dao.IBatteryStationDAO;
import cn.kami.dao.impl.BatteryStationDAOImpl;
import cn.kami.dbc.DatabaseConnection;
import cn.kami.factory.DatabaseConnectionFactory;
import cn.kami.vo.BatteryStation;

public class BatteryStationDAOProxy implements IBatteryStationDAO {
	private DatabaseConnection dbc = null;
	private BatteryStationDAOImpl dao = null;
	public BatteryStationDAOProxy()throws Exception{
		this.dbc = DatabaseConnectionFactory.getOracleDatabaseConnection();
		this.dao = new BatteryStationDAOImpl(this.dbc.getConnection());
	}
	@Override
	public List<BatteryStation> findAllStationName() throws Exception {
		// TODO Auto-generated method stub
		List<BatteryStation> all = null;
		try{
			all = this.dao.findAllStationName();
		}catch(Exception e){
			throw e;
		}finally{
			this.dbc.close();
		}
		return all;
	}

}
